#!/usr/bin/python

from Screens import *
from Load import Load
import pygame as p

opened=False
openx:int

def open(data:Load,screen:p.Surface,zy:bool,number:int,w=854,h=480):
    global openx,opened
    locates=data.vanilla['locates']
    opened=True
    openx=number
    locate=locates[openx]
    if locate['zhengying']!=zy:
        bushiniddipan(data=data,screen=screen,w=w,h=h)
        return bushiniddipan
    else:
        darenzheshi(data=data,screen=screen,textx=locate['name'],w=w,h=h)
        return darenzheshi
def close():
    global openx,opened
    openx=-1
    opened=False